package com.dataextend.Enum;

public enum TrackingEnum {
    CODE1("app_start", "启动app"),
    CODE2("search_goods", "搜索商品"),
    CODE3("addtobag_click", "点击加入购物车"),
    CODE4("app_logout", "退出app"),
    CODE5("page_view", "页面浏览"),
    CODE6("register", "注册"),
    CODE7("commit_form", "提交订单"),
    CODE8("goods_detail_view", "商品详情页查看"),
    CODE9("goods_click", "点击商品"),
    CODE10("cancel_form", "取消订单"),
    CODE11("pay_form", "支付订单");

    private String code;
    private String name;

    public static String getName(String code){
        for (TrackingEnum c : TrackingEnum.values()){
            if (c.getCode().equals(code)){
                return c.name;
            }
        }
        return null;
    }

    private TrackingEnum(String code, String name){
        this.code = code;
        this.name = name;
    }

    public java.lang.String getCode() {
        return code;
    }

    public void setCode(java.lang.String code) {
        this.code = code;
    }

    public java.lang.String getName() {
        return name;
    }

    public void setName(java.lang.String name) {
        this.name = name;
    }

}
